package com.hxl.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hxl.config.LogAnnotation;
import com.hxl.entity.CmfzGuru;
import com.hxl.entity.CmfzLog;
import com.hxl.service.CmfzLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * InnoDB free: 12288 kB 前端控制器
 * </p>
 *
 * @author hxl
 * @since 2020-08-21
 */
@RestController
@RequestMapping("log")
public class CmfzLogController {
    @Autowired
    private CmfzLogService cmfzLogService;
    @RequestMapping("logs")
    @LogAnnotation(content = "查看日志信息",type = "select")
    public Map<String,Object> selectBanners(Integer page, Integer limit){
        Map<String,Object> map = new HashMap<>();
        Page<CmfzLog> p = cmfzLogService.selectLog(page, limit);
        map.put("code",0);
        map.put("msg","");
        map.put("count",p.getTotal());
        map.put("data",p.getRecords());

        return map;
    }
}
